package com.blog4java.mybatis.example.entity;

import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
public class User {
    private Long id;
    private String name;
    private Date createTime;
    private String password;
    private String phone;
    private String gender;
    private String nickName;
    private List<Order> orders;
    
    //必须保留无参构造（MyBatis反射需要）
	public User() {

	}
    
	//必须包含与SQL结果集列名匹配的构造方法
	public User(Long id, String name) {
		this.id = id;
		this.name = name;
	}
}
